package flc.ast.adapter;


import android.graphics.Color;

import androidx.annotation.NonNull;

import com.blankj.utilcode.util.ConvertUtils;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;
import stark.common.basic.adaptermutil.StkSingleSpanProvider;
import stark.common.basic.utils.TimeUtil;

public class TodayIndexAdapter extends StkProviderMultiAdapter<Boolean> {

    public boolean hasQuery;
    public String keyWord;

    public TodayIndexAdapter() {
        addItemProvider(new StkSingleSpanProvider(126));
        addItemProvider(new TodayIndexProvider());
    }

    private class TodayIndexProvider extends BaseItemProvider<Boolean> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_today_index;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, Boolean bean) {
            if (bean) {
                baseViewHolder.setImageResource(R.id.ivTodayIndexItemImg, R.drawable.aimg_jrzs1);
            } else {
                baseViewHolder.setImageResource(R.id.ivTodayIndexItemImg, R.drawable.aimg_jrzs2);
            }
        }
    }

}
